import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../components/HelloWorld.vue'

// 定义路由
const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/about",
    name: "About",
    component: () => import("../components/HelloWorld.vue"), // 懒加载
  },
  //登录
  {
    path: "/login",
    name: "login",
    component: () => import("../view/login.vue"),
  },
  {
    //测试(注册码)
    path: "/kaifang",
    name: "kaifang",
    component: () => import("../view/kaifang.vue"),
  },
  {
    //说明文档
    path: "/describeWord",
    name: "describeWord",
    component: () => import("../view/describeWord.vue"),
  },
  {
    //测试(注册码)
    path: "/indexdo",
    name: "indexdo",
    component: () => import("../view/homepage/indexdo.vue"),
  },
  {
    //Excel模板
    path: "/Excelview",
    name: "Excelview",
    component: () => import("../view/Excelview.vue"),
  },

  {
    //设备模板
    path: "/devicetemplate",
    name: "devicetemplate",
    component: () => import("../view/devicetemplate.vue"),
  },

  {
    //上传下载
    path: "/upDownload",
    name: "upDownload",
    component: () => import("../view/upDownload.vue"),
  },
  //版本3
  //网关信息
  {
    path: "/gatewayInfo",
    name: "gatewayInfo",
    component: () => import("../view/version3/gatewayInfo.vue"),
  },

  //采集通道
  {
    path: "/collectionChannel",
    name: "collectionChannel",
    component: () => import("../view/version3/collectionChannel.vue"),
  },
  //MQTT配置
  {
    path: "/mqttConfig",
    name: "mqttConfig",
    component: () => import("../view/version3/mqttConfig.vue"),
  },
  //物模型配置
  {
    path: "/physicalModel",
    name: "physicalModel",
    component: () => import("../view/version3/physicalModel.vue"),
  },
  {
    //设备编辑
    path: "/deviceEditing",
    name: "deviceEditing",
    component: () => import("../view/deviceEditing.vue"),
  },
  {
    //变量编辑
    path: "/variableEditing",
    name: "variableEditing",
    component: () => import("../view/variableEditing.vue"),
  },
  {
    //转发通道
    path: "/forwardingChannel",
    name: "forwardingChannel",
    component: () => import("../view/forwardingChannel.vue"),
  },

  {
    //协议管理
    path: "/agreement",
    name: "agreement",
    component: () => import("../view/version3/agreement.vue"),
  },
  {
    //报文查看
    path: "/messageViewing",
    name: "messageViewing",
    component: () => import("../view/version3/messageViewing.vue"),
  },
  {
    //高级功能
    path: "/menuConfiguration",
    name: "menuConfiguration",
    component: () => import("../view/version3/menuConfiguration.vue"),
  },
  {
    //logo配置
    path: "/logoConfiguration",
    name: "logoConfiguration",
    component: () => import("../view/version3/logoConfiguration.vue"),
  },
  {
    //数据备份
    path: "/dataBackup",
    name: "dataBackup",
    component: () => import("../view/version3/dataBackup.vue"),
  },
  {
    //日志查看
    path: "/logViewing",
    name: "logViewing",
    component: () => import("../view/version3/logViewing.vue"),
  },
  {
    //更新程序
    path: "/updateProgram",
    name: "updateProgram",
    component: () => import("../view/version3/updateProgram.vue"),
  },
  {
    //日志查看
    path: "/aboutConfiguration",
    name: "aboutConfiguration",
    component: () => import("../view/version3/aboutConfiguration.vue"),
  },
  {
    //日志查看
    path: "/cronCongfig",
    name: "cronCongfig",
    component: () => import("../view/cronCongfig.vue"),
  },

  {
    //日志查看
    path: "/realTimeValue",
    name: "realTimeValue",
    component: () => import("../view/realTimeValue.vue"),
  },
  //变量管理
  {
    path: "/variableManage",
    name: "variableManage",
    component: () => import("../view/configurationss/variableManage.vue"),
  },
  //虚拟设备
  {
    path: "/virtualDevice",
    name: "virtualDevice",
    component: () => import("../view/configurationss/virtualDevice.vue"),
  },
  //设备类型
  {
    path: "/deviceTypeConfig",
    name: "deviceTypeConfig",
    component: () => import("../view/configurationss/deviceTypeConfig.vue"),
  },
  //设备类型
  {
    path: "/deviceTypes",
    name: "deviceTypes",
    component: () => import("../view/configurationss/deviceTypes.vue"),
  },
  //视频配置web版
  {
    path: "/videoConfigure",
    name: "videoConfigure",
    component: () => import("../view/configurationss/videoConfigure.vue"),
  },
  //视频配置
  {
    path: "/webserverVideo",
    name: "webserverVideo",
    component: () => import("../view/webserverVideo.vue"),
  },
  //遥控配置
  {
    path: "/remoteControl",
    name: "remoteControl",
    component: () => import("../view/configurationss/remoteControl.vue"),
  },

  {
    //融合版的授权管理
    path: "/authorizationConfig",
    name: "authorizationConfig",
    component: () => import("../view/authorizationConfig.vue"),
  },

  //组织架构
  // {
  //   path: '/unitManage',
  //   name: 'unitManage',
  //   component: () =>
  //   import('../view/configurationss/unitManage.vue')
  // },
  //角色管理
  // {
  //   path: '/roleManager',
  //   name: 'roleManager',
  //   component: () =>
  //   import('../view/configurationss/roleManager/roleManager.vue')
  // },
  //用户管理
  // {
  //   path: '/userManager',
  //   name: 'userManager',
  //   component: () => import('../view/userManager/userManager.vue')
  // },
  //注册码
  {
    path: "/registrationNo",
    name: "registrationNo",
    component: () => import("../view/registrationNo.vue"),
  },
  //网络配置
  {
    path: "/networkConfig",
    name: "networkConfig",
    component: () => import("../view/version3/networkConfig.vue"),
  },
  //授权管理
  {
    path: "/authorization",
    name: "authorization",
    component: () => import("../view/authorization.vue"),
  },
  //群调群控
  {
    path: "/groupTuning",
    name: "groupTuning",
    component: () => import("../view/version3/groupTuning.vue"),
  },
  //协议仓库
  {
    path: "/protocolWarehouse",
    name: "protocolWarehouse",
    component: () => import("../view/version3/protocolWarehouse.vue"),
  },
  //局域网集控
  {
    path: "/LANcontrol",
    name: "LANcontrol",
    component: () => import("../view/version3/LANcontrol.vue"),
  },
  //群调群控 => 基础配置
  {
    path: "/tuningControl",
    name: "tuningControl",
    component: () => import("../view/version3/tuningControl2.vue"),
  },
  //群调群控 => 设备模型
  {
    path: "/deviceModel",
    name: "deviceModel",
    component: () => import("../view/version3/deviceModel.vue"),
  },
  //群调群控 => 控制配置
  {
    path: "/variableConfig",
    name: "variableConfig",
    component: () => import("../view/version3/variableConfig.vue"),
  },
  //变量设备
  {
    path: "/variableDevice",
    name: "variableDevice",
    component: () => import("../view/AdvancedFunctionGroup/variableDevice.vue"),
  },
  //远程配置
  {
    path: "/remoteConfiguration",
    name: "remoteConfiguration",
    component: () =>
      import("../view/cloudManagementMachine/remoteConfiguration.vue"),
  },
];

// 创建路由实例
const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
